<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/include/TLDInclude.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ include file="/WEB-INF/include/meta.jsp"%>
<title>活动录入</title>
<link href="${ctx}/css/select.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${ctx}/js/select-ui.min.js"></script>
<script type="text/javascript" src="${ctx}/js/My97DatePicker/WdatePicker.js"></script>


<script type="text/javascript">
$(document).ready(function(e) {
    $(".select1").uedSelect({
		width : 345			  
	});
	$(".select2").uedSelect({
		width : 167  
	});
	$(".select3").uedSelect({
		width : 100
	});
	
});


function checkdata(){
	  if ($("#inputid1").val() == '' || $("#inputid2").val() == '' || $("#inputid3").val() == '' || $("#inputid4").val() == '') {
		  alert("带*的值必须录入");
		  return false;
	  }
	return true;
}
</script>

</head>

<body>

<c:if test="${not empty msg}">
			<div id="message" style="color: red;" align="center">
				${msg}
			</div>
</c:if>
	
	<c:if test="${empty msg}">
			

    
    <div class="formbody">
    
    <div class="formtitle"><span>活动资料录入</span></div>
    <form:form action="${ctx}/activity/update" method="post" modelAttribute="entity" >
    <input type=hidden name="id"  value="${entity.id}"/>
    <ul class="forminfo">
    
    	<c:if test="${empty entity.id}">
    <li><label>活动名称<b>*</b></label><input id="inputid1" name="name" type="text" value="${entity.name}" class="dfinput" /></li>
    <li><label>系列CODE<b>*</b></label><input id="inputid2" name="seriesCode" type="text" value="${entity.seriesCode}" class="dfinput" /><i>(抽奖同一种奖必须名称一样)</i></li>
   	</c:if>
   	
   	<li><label>开始时间<b>*</b></label><input id="inputid3" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"  name="startTime" type="text" value="<fmt:formatDate value='${entity.startTime}' pattern='yyyy-MM-dd HH:mm:ss'/>" class="dfinput" /></li>
   	 <li><label>结束时间<b>*</b></label><input id="inputid4" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" name="endTime" type="text" value="<fmt:formatDate value='${entity.endTime}' pattern='yyyy-MM-dd HH:mm:ss'/>" class="dfinput" /></li>
    <li><label>&nbsp;</label><input name="" type="submit" onclick="javascript:return checkdata()" class="btn" value="确认保存"/></li>
    </ul>
    
    </form:form>
    </div>

</c:if>
</body>

</html>
